package com.workManager.service;

import com.workManager.mapper.TbProjectPaymentMapper;
import com.workManager.pojo.TbProjectPayment;
import com.workManager.vo.ProjectPaymentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Thinkpad on 2017/7/12 0012.
 */
@Service
public class ProjectPaymentServiceImpl implements ProjectPaymentService {
    @Autowired
    private TbProjectPaymentMapper projectPaymentMapper;

    public int add(TbProjectPayment projectPayment) {
        return projectPaymentMapper.insert(projectPayment);
    }

    public int delete(Integer projectPaymentId) {
        return projectPaymentMapper.deleteByPrimaryKey(projectPaymentId);
    }

    public List<ProjectPaymentVo> query(Map map) {
        return projectPaymentMapper.queryPayment(map);
    }

    public int update(TbProjectPayment projectPayment) {
        return projectPaymentMapper.updateByPrimaryKey(projectPayment);
    }
}
